package admin;

import org.apache.commons.lang.StringUtils;


import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;








public class Config extends Model<Config> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 300L;
	public static final Config dao = new Config();
	
	public Config findConfigByGuid(String guid) {
		String sql = "select * from config where 1=1 ";
		if(StringUtils.isNotEmpty(guid)){
			sql += " and guid = '"+guid+"'";
		}else{
			sql += " and guid = ''";
		}
		return dao.findFirst(sql);
	}
	
}
